package com.example.orderservice.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author whx
 * @date 2022/1/3
 */
@RestController
@RequestMapping("order")
public class OrderController {
    private static final Logger LOG = LoggerFactory.getLogger(OrderController.class);

    @GetMapping("info")
    public String infoLog(String log){
        LOG.info("[order log]"+log);
        return log;
    }

    @GetMapping("error")
    public String errorLog(String log){
        LOG.error("[order error]"+log);
        int i = 1/0;
        return log;
    }

}
